package com.gmail.blackdog1987.onedollar.entity;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * Created by dongguochao on 12/7/15.
 */
@Entity
@Table(name = "t_order_info", schema = "", catalog = "onedollar")
public class TOrderInfoEntity {
    private int orderId;
    private Integer userId;
    private Integer sellerId;
    private Integer orderStatus;
    private Integer shippingStatus;
    private Integer payId;
    private Integer payStatus;
    private Integer judgeStatus;
    private Integer isRefund;
    private String consignee;
    private Integer district;
    private String address;
    private String zipcode;
    private String tel;
    private String mobile;
    private String email;
    private String bestTime;
    private String signBuilding;
    private String postscript;
    private Integer shippingId;
    private String shippingName;
    private String invPayee;
    private String invContent;
    private BigDecimal goodsAmount;
    private BigDecimal shippingFee;
    private BigDecimal insureFee;
    private BigDecimal integralMoney;
    private BigDecimal orderAmount;
    private BigDecimal actualAmount;
    private Timestamp addTime;
    private Timestamp confirmTime;
    private Timestamp payTime;
    private Timestamp shippingTime;
    private String payNote;
    private BigDecimal tax;
    private Integer logisticsId;
    private String wlName;
    private String waybill;
    private Integer processMode;
    private String operator;
    private Timestamp finishTime;
    private Integer type;
    private Integer showStatus;
    private Integer invalid;
    private Integer onedollarId;

    @Id
    @GeneratedValue
    @Column(name = "order_id", nullable = false, insertable = true, updatable = true)
    public int getOrderId() {
        return orderId;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }

    @Basic
    @Column(name = "user_id", nullable = true, insertable = true, updatable = true)
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "show_status", nullable = true, insertable = true, updatable = true)
    public Integer getShowStatus() {
        return showStatus;
    }

    public void setShowStatus(Integer showStatus) {
        this.showStatus = showStatus;
    }

    @Basic
    @Column(name = "seller_id", nullable = true, insertable = true, updatable = true)
    public Integer getSellerId() {
        return sellerId;
    }

    public void setSellerId(Integer sellerId) {
        this.sellerId = sellerId;
    }

    @Basic
    @Column(name = "order_status", nullable = true, insertable = true, updatable = true)
    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    @Basic
    @Column(name = "shipping_status", nullable = true, insertable = true, updatable = true)
    public Integer getShippingStatus() {
        return shippingStatus;
    }

    public void setShippingStatus(Integer shippingStatus) {
        this.shippingStatus = shippingStatus;
    }

    @Basic
    @Column(name = "pay_id", nullable = true, insertable = true, updatable = true)
    public Integer getPayId() {
        return payId;
    }

    public void setPayId(Integer payId) {
        this.payId = payId;
    }

    @Basic
    @Column(name = "pay_status", nullable = true, insertable = true, updatable = true)
    public Integer getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
    }

    @Basic
    @Column(name = "judge_status", nullable = true, insertable = true, updatable = true)
    public Integer getJudgeStatus() {
        return judgeStatus;
    }

    public void setJudgeStatus(Integer judgeStatus) {
        this.judgeStatus = judgeStatus;
    }

    @Basic
    @Column(name = "is_refund", nullable = true, insertable = true, updatable = true)
    public Integer getIsRefund() {
        return isRefund;
    }

    public void setIsRefund(Integer isRefund) {
        this.isRefund = isRefund;
    }

    @Basic
    @Column(name = "consignee", nullable = true, insertable = true, updatable = true, length = 50)
    public String getConsignee() {
        return consignee;
    }

    public void setConsignee(String consignee) {
        this.consignee = consignee;
    }

    @Basic
    @Column(name = "district", nullable = true, insertable = true, updatable = true)
    public Integer getDistrict() {
        return district;
    }

    public void setDistrict(Integer district) {
        this.district = district;
    }

    @Basic
    @Column(name = "address", nullable = true, insertable = true, updatable = true, length = 200)
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Basic
    @Column(name = "zipcode", nullable = true, insertable = true, updatable = true, length = 20)
    public String getZipcode() {
        return zipcode;
    }

    public void setZipcode(String zipcode) {
        this.zipcode = zipcode;
    }

    @Basic
    @Column(name = "tel", nullable = true, insertable = true, updatable = true, length = 20)
    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    @Basic
    @Column(name = "mobile", nullable = true, insertable = true, updatable = true, length = 20)
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Basic
    @Column(name = "email", nullable = true, insertable = true, updatable = true, length = 30)
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Basic
    @Column(name = "best_time", nullable = true, insertable = true, updatable = true, length = 20)
    public String getBestTime() {
        return bestTime;
    }

    public void setBestTime(String bestTime) {
        this.bestTime = bestTime;
    }

    @Basic
    @Column(name = "sign_building", nullable = true, insertable = true, updatable = true, length = 50)
    public String getSignBuilding() {
        return signBuilding;
    }

    public void setSignBuilding(String signBuilding) {
        this.signBuilding = signBuilding;
    }

    @Basic
    @Column(name = "postscript", nullable = true, insertable = true, updatable = true, length = 65535)
    public String getPostscript() {
        return postscript;
    }

    public void setPostscript(String postscript) {
        this.postscript = postscript;
    }

    @Basic
    @Column(name = "shipping_id", nullable = true, insertable = true, updatable = true)
    public Integer getShippingId() {
        return shippingId;
    }

    public void setShippingId(Integer shippingId) {
        this.shippingId = shippingId;
    }

    @Basic
    @Column(name = "shipping_name", nullable = true, insertable = true, updatable = true, length = 30)
    public String getShippingName() {
        return shippingName;
    }

    public void setShippingName(String shippingName) {
        this.shippingName = shippingName;
    }

    @Basic
    @Column(name = "inv_payee", nullable = true, insertable = true, updatable = true, length = 100)
    public String getInvPayee() {
        return invPayee;
    }

    public void setInvPayee(String invPayee) {
        this.invPayee = invPayee;
    }

    @Basic
    @Column(name = "inv_content", nullable = true, insertable = true, updatable = true, length = 200)
    public String getInvContent() {
        return invContent;
    }

    public void setInvContent(String invContent) {
        this.invContent = invContent;
    }

    @Basic
    @Column(name = "goods_amount", nullable = true, insertable = true, updatable = true, precision = 2)
    public BigDecimal getGoodsAmount() {
        return goodsAmount;
    }

    public void setGoodsAmount(BigDecimal goodsAmount) {
        this.goodsAmount = goodsAmount;
    }

    @Basic
    @Column(name = "shipping_fee", nullable = true, insertable = true, updatable = true, precision = 2)
    public BigDecimal getShippingFee() {
        return shippingFee;
    }

    public void setShippingFee(BigDecimal shippingFee) {
        this.shippingFee = shippingFee;
    }

    @Basic
    @Column(name = "insure_fee", nullable = true, insertable = true, updatable = true, precision = 2)
    public BigDecimal getInsureFee() {
        return insureFee;
    }

    public void setInsureFee(BigDecimal insureFee) {
        this.insureFee = insureFee;
    }

    @Basic
    @Column(name = "integral_money", nullable = true, insertable = true, updatable = true, precision = 2)
    public BigDecimal getIntegralMoney() {
        return integralMoney;
    }

    public void setIntegralMoney(BigDecimal integralMoney) {
        this.integralMoney = integralMoney;
    }

    @Basic
    @Column(name = "order_amount", nullable = true, insertable = true, updatable = true, precision = 2)
    public BigDecimal getOrderAmount() {
        return orderAmount;
    }

    public void setOrderAmount(BigDecimal orderAmount) {
        this.orderAmount = orderAmount;
    }

    @Basic
    @Column(name = "actual_amount", nullable = true, insertable = true, updatable = true, precision = 2)
    public BigDecimal getActualAmount() {
        return actualAmount;
    }

    public void setActualAmount(BigDecimal actualAmount) {
        this.actualAmount = actualAmount;
    }

    @Basic
    @Column(name = "add_time", nullable = true, insertable = true, updatable = true)
    public Timestamp getAddTime() {
        return addTime;
    }

    public void setAddTime(Timestamp addTime) {
        this.addTime = addTime;
    }

    @Basic
    @Column(name = "confirm_time", nullable = true, insertable = true, updatable = true)
    public Timestamp getConfirmTime() {
        return confirmTime;
    }

    public void setConfirmTime(Timestamp confirmTime) {
        this.confirmTime = confirmTime;
    }

    @Basic
    @Column(name = "pay_time", nullable = true, insertable = true, updatable = true)
    public Timestamp getPayTime() {
        return payTime;
    }

    public void setPayTime(Timestamp payTime) {
        this.payTime = payTime;
    }

    @Basic
    @Column(name = "shipping_time", nullable = true, insertable = true, updatable = true)
    public Timestamp getShippingTime() {
        return shippingTime;
    }

    public void setShippingTime(Timestamp shippingTime) {
        this.shippingTime = shippingTime;
    }

    @Basic
    @Column(name = "pay_note", nullable = true, insertable = true, updatable = true, length = 65535)
    public String getPayNote() {
        return payNote;
    }

    public void setPayNote(String payNote) {
        this.payNote = payNote;
    }

    @Basic
    @Column(name = "tax", nullable = true, insertable = true, updatable = true, precision = 2)
    public BigDecimal getTax() {
        return tax;
    }

    public void setTax(BigDecimal tax) {
        this.tax = tax;
    }

    @Basic
    @Column(name = "logistics_id", nullable = true, insertable = true, updatable = true)
    public Integer getLogisticsId() {
        return logisticsId;
    }

    public void setLogisticsId(Integer logisticsId) {
        this.logisticsId = logisticsId;
    }

    @Basic
    @Column(name = "wl_name", nullable = true, insertable = true, updatable = true, length = 50)
    public String getWlName() {
        return wlName;
    }

    public void setWlName(String wlName) {
        this.wlName = wlName;
    }

    @Basic
    @Column(name = "waybill", nullable = true, insertable = true, updatable = true, length = 50)
    public String getWaybill() {
        return waybill;
    }

    public void setWaybill(String waybill) {
        this.waybill = waybill;
    }

    @Basic
    @Column(name = "process_mode", nullable = true, insertable = true, updatable = true)
    public Integer getProcessMode() {
        return processMode;
    }

    public void setProcessMode(Integer processMode) {
        this.processMode = processMode;
    }

    @Basic
    @Column(name = "operator", nullable = true, insertable = true, updatable = true, length = 50)
    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    @Basic
    @Column(name = "finish_time", nullable = true, insertable = true, updatable = true)
    public Timestamp getFinishTime() {
        return finishTime;
    }

    public void setFinishTime(Timestamp finishTime) {
        this.finishTime = finishTime;
    }

    @Basic
    @Column(name = "type", nullable = true, insertable = true, updatable = true)
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Basic
    @Column(name = "invalid", nullable = true, insertable = true, updatable = true)
    public Integer getInvalid() {
        return invalid;
    }

    public void setInvalid(Integer invalid) {
        this.invalid = invalid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TOrderInfoEntity that = (TOrderInfoEntity) o;

        if (orderId != that.orderId) return false;
        if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;
        if (sellerId != null ? !sellerId.equals(that.sellerId) : that.sellerId != null) return false;
        if (orderStatus != null ? !orderStatus.equals(that.orderStatus) : that.orderStatus != null) return false;
        if (shippingStatus != null ? !shippingStatus.equals(that.shippingStatus) : that.shippingStatus != null)
            return false;
        if (payId != null ? !payId.equals(that.payId) : that.payId != null) return false;
        if (payStatus != null ? !payStatus.equals(that.payStatus) : that.payStatus != null) return false;
        if (judgeStatus != null ? !judgeStatus.equals(that.judgeStatus) : that.judgeStatus != null) return false;
        if (isRefund != null ? !isRefund.equals(that.isRefund) : that.isRefund != null) return false;
        if (consignee != null ? !consignee.equals(that.consignee) : that.consignee != null) return false;
        if (district != null ? !district.equals(that.district) : that.district != null) return false;
        if (address != null ? !address.equals(that.address) : that.address != null) return false;
        if (zipcode != null ? !zipcode.equals(that.zipcode) : that.zipcode != null) return false;
        if (tel != null ? !tel.equals(that.tel) : that.tel != null) return false;
        if (mobile != null ? !mobile.equals(that.mobile) : that.mobile != null) return false;
        if (email != null ? !email.equals(that.email) : that.email != null) return false;
        if (bestTime != null ? !bestTime.equals(that.bestTime) : that.bestTime != null) return false;
        if (signBuilding != null ? !signBuilding.equals(that.signBuilding) : that.signBuilding != null) return false;
        if (postscript != null ? !postscript.equals(that.postscript) : that.postscript != null) return false;
        if (shippingId != null ? !shippingId.equals(that.shippingId) : that.shippingId != null) return false;
        if (shippingName != null ? !shippingName.equals(that.shippingName) : that.shippingName != null) return false;
        if (invPayee != null ? !invPayee.equals(that.invPayee) : that.invPayee != null) return false;
        if (invContent != null ? !invContent.equals(that.invContent) : that.invContent != null) return false;
        if (goodsAmount != null ? !goodsAmount.equals(that.goodsAmount) : that.goodsAmount != null) return false;
        if (shippingFee != null ? !shippingFee.equals(that.shippingFee) : that.shippingFee != null) return false;
        if (insureFee != null ? !insureFee.equals(that.insureFee) : that.insureFee != null) return false;
        if (integralMoney != null ? !integralMoney.equals(that.integralMoney) : that.integralMoney != null)
            return false;
        if (orderAmount != null ? !orderAmount.equals(that.orderAmount) : that.orderAmount != null) return false;
        if (actualAmount != null ? !actualAmount.equals(that.actualAmount) : that.actualAmount != null) return false;
        if (addTime != null ? !addTime.equals(that.addTime) : that.addTime != null) return false;
        if (confirmTime != null ? !confirmTime.equals(that.confirmTime) : that.confirmTime != null) return false;
        if (payTime != null ? !payTime.equals(that.payTime) : that.payTime != null) return false;
        if (shippingTime != null ? !shippingTime.equals(that.shippingTime) : that.shippingTime != null) return false;
        if (payNote != null ? !payNote.equals(that.payNote) : that.payNote != null) return false;
        if (tax != null ? !tax.equals(that.tax) : that.tax != null) return false;
        if (logisticsId != null ? !logisticsId.equals(that.logisticsId) : that.logisticsId != null) return false;
        if (wlName != null ? !wlName.equals(that.wlName) : that.wlName != null) return false;
        if (waybill != null ? !waybill.equals(that.waybill) : that.waybill != null) return false;
        if (processMode != null ? !processMode.equals(that.processMode) : that.processMode != null) return false;
        if (operator != null ? !operator.equals(that.operator) : that.operator != null) return false;
        if (finishTime != null ? !finishTime.equals(that.finishTime) : that.finishTime != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;
        if (invalid != null ? !invalid.equals(that.invalid) : that.invalid != null) return false;
        if (showStatus != null ? !showStatus.equals(that.showStatus) : that.showStatus != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = orderId;
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        result = 31 * result + (sellerId != null ? sellerId.hashCode() : 0);
        result = 31 * result + (orderStatus != null ? orderStatus.hashCode() : 0);
        result = 31 * result + (shippingStatus != null ? shippingStatus.hashCode() : 0);
        result = 31 * result + (payId != null ? payId.hashCode() : 0);
        result = 31 * result + (payStatus != null ? payStatus.hashCode() : 0);
        result = 31 * result + (judgeStatus != null ? judgeStatus.hashCode() : 0);
        result = 31 * result + (isRefund != null ? isRefund.hashCode() : 0);
        result = 31 * result + (consignee != null ? consignee.hashCode() : 0);
        result = 31 * result + (district != null ? district.hashCode() : 0);
        result = 31 * result + (address != null ? address.hashCode() : 0);
        result = 31 * result + (zipcode != null ? zipcode.hashCode() : 0);
        result = 31 * result + (tel != null ? tel.hashCode() : 0);
        result = 31 * result + (mobile != null ? mobile.hashCode() : 0);
        result = 31 * result + (email != null ? email.hashCode() : 0);
        result = 31 * result + (bestTime != null ? bestTime.hashCode() : 0);
        result = 31 * result + (signBuilding != null ? signBuilding.hashCode() : 0);
        result = 31 * result + (postscript != null ? postscript.hashCode() : 0);
        result = 31 * result + (shippingId != null ? shippingId.hashCode() : 0);
        result = 31 * result + (shippingName != null ? shippingName.hashCode() : 0);
        result = 31 * result + (invPayee != null ? invPayee.hashCode() : 0);
        result = 31 * result + (invContent != null ? invContent.hashCode() : 0);
        result = 31 * result + (goodsAmount != null ? goodsAmount.hashCode() : 0);
        result = 31 * result + (shippingFee != null ? shippingFee.hashCode() : 0);
        result = 31 * result + (insureFee != null ? insureFee.hashCode() : 0);
        result = 31 * result + (integralMoney != null ? integralMoney.hashCode() : 0);
        result = 31 * result + (orderAmount != null ? orderAmount.hashCode() : 0);
        result = 31 * result + (actualAmount != null ? actualAmount.hashCode() : 0);
        result = 31 * result + (addTime != null ? addTime.hashCode() : 0);
        result = 31 * result + (confirmTime != null ? confirmTime.hashCode() : 0);
        result = 31 * result + (payTime != null ? payTime.hashCode() : 0);
        result = 31 * result + (shippingTime != null ? shippingTime.hashCode() : 0);
        result = 31 * result + (payNote != null ? payNote.hashCode() : 0);
        result = 31 * result + (tax != null ? tax.hashCode() : 0);
        result = 31 * result + (logisticsId != null ? logisticsId.hashCode() : 0);
        result = 31 * result + (wlName != null ? wlName.hashCode() : 0);
        result = 31 * result + (waybill != null ? waybill.hashCode() : 0);
        result = 31 * result + (processMode != null ? processMode.hashCode() : 0);
        result = 31 * result + (operator != null ? operator.hashCode() : 0);
        result = 31 * result + (finishTime != null ? finishTime.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (invalid != null ? invalid.hashCode() : 0);
        result = 31 * result + (showStatus != null ? showStatus.hashCode() : 0);
        return result;
    }

    @Basic
    @Column(name = "onedollar_id", nullable = true, insertable = true, updatable = true)
    public Integer getOnedollarId() {
        return onedollarId;
    }

    public void setOnedollarId(Integer onedollarId) {
        this.onedollarId = onedollarId;
    }
}
